from fractions import Fraction

#Get multiples of fractions
def multiples(num, den, limit=100):
    a = 1
    yield num,den
    while a < limit:
        yield (num * a,den * a)
        a += 1

def getf(num):#Return factors (excluding 1!)
    for x in range(2,num+1):
        if num % x == 0:
            yield x

def canreduce(num,den):
    d = list(getf(den))
    for x in getf(num):
        if x in d:
            return True
    return False
    
def ltoi(list):
    a = ''
    for l in list:
        a += l
    return int(a)
    
def getposs(num,den):
    if num < 10 or den < 10 or num % 10 == 0 or den % 10 == 0:
        return
    n = list(str(num))
    d = list(str(den))
    for x in range(len(n)):
        for y in range(len(d)):
            if n[x] == d[y]:
                a = n * 1
                b = d * 1
                a.pop(x)
                b.pop(y)
                retn = ltoi(a)
                retd = ltoi(b)
                yield (retn,retd)        



for d in range(1,99):
    for n in range(1,d):
        m = list(multiples(n,d))
        for a,b in m:
            if a < 100 and b < 100:
                if (n,d) in list(getposs(a,b)):
                    print(str(a)+"/"+str(b)+"->"+str(n)+"/"+str(d))